import React from 'react';
import {connect} from 'react-redux';
import actions from '../store/actions/counter';

class Counter extends React.Component{
    render() {
        console.log('his.props',this.props);
        return (
            <div>
                <p>{this.props.number}</p>
                <button onClick={this.props.increment}>++++</button>
                <button onClick={this.props.stop}>停止</button>

            </div>
        );
    }
}
export default connect(
    state => state.counter,
    actions
)(Counter)

